home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / pc / ps40sdk / examples / selection / shape / common / shape.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-12  |  2.3 KB  |  102 lines

  1. /*
  2.     File: Shape.h
  3.  
  4.     Copyright (c) 1996, Adobe Systems Incorporated.
  5.     All rights reserved.
  6.  
  7.     Utilities for Shape example selection module.
  8. */
  9.  
  10. #ifndef __Shape_H__
  11. #define __Shape_H__
  12.  
  13. #include "PISelection.h"
  14. #include "PIUtilities.h"
  15.  
  16. /*****************************************************************************/
  17. /* Scripting keys */
  18. #define ourSuiteID            'sdK8'
  19. #define ourClassID            ourSuiteID
  20. #define ourEventID            'shpE'
  21. #define shapeTriangle        'shP0'
  22. #define shapeSquare            'shP1'
  23. #define shapeCircle            'shP2'
  24. #define shapeStar            'shP3'
  25. #define shapeTreble            'shP4'
  26. #define    shapeRibbon            'shP5'
  27. #define shapeNote            'shP6'
  28. #define typeShape            'tshP'
  29. #define keyCreate            'kcrE'
  30. #define typeCreate            'tcrE'
  31. #define typePISel            'tpiS'
  32. #define    createSelection        'crE0'
  33. #define createMaskpath        'crE1'
  34. #define createLayer            'crE2'
  35.  
  36. /*****************************************************************************/
  37. /* Any constants here */
  38.  
  39. #define kFirstItem            4
  40. #define kLastItem            kFirstItem+6
  41. #define kCreateRadio1        12
  42. #define kCreateRadioLast    kCreateRadio1+2
  43. #define PathResource        'Path'
  44.  
  45. /*****************************************************************************/
  46.  
  47. enum
  48. {
  49.     iShapeTriangle,
  50.     iShapeSquare,
  51.     iShapeCircle,
  52.     iShapeStar,
  53.     iShapeTreble,
  54.     iShapeRibbon,
  55.     iShapeNote
  56. };
  57.  
  58. enum
  59. {
  60.     iCreateSelection,
  61.     iCreateMaskpath,
  62.     iCreateLayer
  63. };
  64.  
  65. /*****************************************************************************/
  66.  
  67. extern Handle hDllInstance;
  68.  
  69. typedef struct Globals
  70.     {
  71.     short     result;
  72.     short    whatShape;
  73.     short    create;
  74.     Boolean    queryForParameters;
  75.     PISelectionParams *selectionParamBlock;
  76.     } Globals, *GPtr, **GHdl;
  77.     
  78. #define gResult (globals->result)
  79. #define gStuff  (globals->selectionParamBlock)
  80. #define gWhatShape (globals->whatShape)
  81. #define gQueryForParameters (globals->queryForParameters)
  82. #define gCreate (globals->create)
  83.  
  84. /*****************************************************************************/
  85.  
  86. void DoAbout (GPtr globals);
  87. Boolean DoParameters (GPtr globals);
  88. short KeyToEnum (OSType key, OSType whatType);
  89. OSType EnumToKey (short keyEnum, OSType whatType);
  90. Boolean ReadScriptParams (GPtr globals);
  91. OSErr WriteScriptParams (GPtr globals);
  92.  
  93. /*****************************************************************************/
  94.  
  95. #if MSWindows
  96. extern Handle hDllInstance; /* Dll for Windows; leave NULL for Mac */
  97. #else //Mac
  98. #define hDllInstance    NULL
  99. #endif
  100.  
  101. #endif /* __Shape_H__ */
  102.